var tpl = _include('./index.html');
appendCss(_include('./index.less?_ac=less'));
var scenes = require('/src/vue/scenes/index.js');
var uploadimg = require('/src/vue/uploadimg/index.js');


var CreateGame = {
    template: tpl,
    props:['lottery','prizes','limit'],
    components:{
        scenes:scenes,
        uploadimg:uploadimg
    },
    methods:{
        setPrize:function(){
            var limit  = this.limit['type'+this.lottery.type];
            if(this.prizes.length>=limit){
                alert('已经达到奖品配置数量上限!');
            }else{
                window.sendMessage('createPrize.status')
            }
        },
        listenmsgfromchild:function(src){
            this.$emit('listenmsgfromchild',src);
        }
    }
};

module.exports = CreateGame;